const express = require('express');
const merchantCtrl = require('../../app/controllers/merchant.server.controller.js');

module.exports = (app) => {
    const router = express.Router();
    
    router.route('/regist')
    .post(merchantCtrl.regist);

    router.route('/login')
        .post(merchantCtrl.login);

    router.route('/update')
        .post(merchantCtrl.update);

    router.route('/logout')
        .post(merchantCtrl.logout);

    router.route('/updateByAdmin')
        .post(merchantCtrl.updateByAdmin);

    router.route('/updateRealInfo')
        .post(merchantCtrl.updateRealInfo)

    app.use('/merchant', router);
};